import Vue from 'vue';
import Router from 'vue-router';
import Index from './src/index.vue';
import Shape from './src/Shape/shape.vue';
import Material from './src/Material/material.vue';
import Camera from './src/Camera/camera.vue';
import Light from './src/Light/light.vue';
import Animation from './src/Animation/animation.vue';
import Hit from './src/Hit/hit.vue';
import Particles from './src/Particles/particles.vue';
import SceneT from './src/Scene/scene.vue';

// const Card = (r: any) =>
//   (require as any).ensure([], () => r(require('@/page/Card/Card'), 'Card'));

Vue.use(Router);

export default new Router({
  mode: 'history',
  base: '/',
  routes: [
    {
      path: '/',
      name: 'home',
      component: Index,
      meta: { main: true },
    },
    {
      path: '/shape',
      name: 'shape',
      component: Shape,
      meta: { main: true },
    },
    {
      path: '/material',
      name: 'material',
      component: Material,
      meta: { main: true },
    },
    {
      path: '/camera',
      name: 'camera',
      component: Camera,
      meta: { main: true },
    },
    {
      path: '/light',
      name: 'light',
      component: Light,
      meta: { main: true },
    },
    {
      path: '/animation',
      name: 'animation',
      component: Animation,
      meta: { main: true },
    },
    {
      path: '/hit',
      name: 'hit',
      component: Hit,
      meta: { main: true },
    },
    {
      path: '/particles',
      name: 'particles',
      component: Particles,
      meta: { main: true },
    },
    {
      path: '/scene',
      name: 'scene',
      component: SceneT,
      meta: { main: true },
    },
  ],
});
